def countlines(name):
    a = 0
    for i in open(name).readlines():
        a += 1
    print('行数：', a)

def countChars(name):
    a = [i for i in open(name).read() if i!='\n']
    print('字数：',len(a))

def test():
    data = input('请输入文件的路径：')
    countlines(data)
    countChars(data)
if __name__ == '__main__':
    test()